package com.liang.jiekou.controller;


import com.liang.jiekou.entity.CMSMC;
import com.liang.jiekou.entity.CMSME;
import com.liang.jiekou.service.CMSMEService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Api(tags = "部门控制器")
@RestController
@RequestMapping("/bm")
public class CMSMEController {
    @Resource
    private CMSMEService cmsmeService;

    @ApiOperation("根据部门编号查询相关信息")
    @GetMapping("/selectCMSME")
    public CMSME select(@RequestParam String ME001){
        return cmsmeService.select(ME001);
    }

    @ApiOperation("查询全部的部门信息")
    @GetMapping("/selectCMSME/all")
    public List<CMSME> selectall(){
        return cmsmeService.selectall();
    }
}
